import storage from '@blueos.storage.storage'


export const setStorage = (key, value) => {
  storage.set({
    key,
    value,
    success: function (data) {
      console.log('handling success')
    },
    fail: function (data, code) {
      console.log(`handling fail, code = ${code}`)
    },
  })
}

export const getStorage = (key) => {
  return storage.getSync({ key })
}
